<template>
  <div class="profile">
    <van-nav-bar title="个人中心"></van-nav-bar>
    <div class="profile-info">
      <template v-if="!$store.state.user.hasPermission">
        <img src="@/assets/logo.png" alt="" />
        <van-button size="small" to="/login">登录</van-button>
      </template>
      <template v-else>
        <img src="@/assets/logo.png" alt="" />
        <span>{{ $store.state.user.username }}</span>
      </template>
    </div>
  </div>
</template>

<script>
// 注册： 用户名 密码 确认密码
// 登录： 用户名 密码

export default {};
</script>

<style lang="scss" scoped>
.profile {
  .profile-info {
    display: flex;
    align-items: center;
    height: 150px;
    padding: 0 15px;
    img {
      width: 100px;
      height: 100px;
    }
  }
}
</style>
